<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>人力资源管理系统</title>
<link rel="stylesheet" href="css/login.css" type="text/css">
<link rel="stylesheet" type="text/css"
	href="easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
<script type="text/javascript" src="easyui/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
if (window != top)   
	top.location.href = location.href; 
function changeImage(){
	var src="getImage.html";
	var rdm=Math.random();
	document.getElementById("img").src=src+"?r="+rdm;
}
function checkLogin(){
	if($("#login_name").val()==""){
		jQuery.messager.show({
				title : '<font color="red">提示:</font>',
				msg : '忘记输用户名了吧?',
				timeout : 2000,
				showType : 'slide'
			});
			return false;
		}
		if ($("#login_password").val() == "") {
			jQuery.messager.show({
				title : '<font color="red">提示:</font>',
				msg : '密码还没输入呢！',
				timeout : 2000,
				showType : 'slide'
			});
			return false;
		}

		if ($("#valifyCode").val() == "") {
			jQuery.messager.show({
				title : '<font color="red">提示:</font>',
				msg : '请输入验证码!',
				timeout : 2000,
				showType : 'slide'
			});
			return false;
		}
		document.loginForm.submit();
	}
	function info(){
		if("${message }"!=""){
			$.messager.show({
				title:'提示',
				msg:"${message }",
				timeout:3000,
				showType:'slide'
			});
		}
		if("${error }"!=""){
			$.messager.show({
				title:'提示',
				msg:"${error }",
				timeout:3000,
				showType:'slide'
			});
		}
	}
</script>
</head>
<body onload="info()">
<form name="loginForm" action="checkLogin.html" method="post">
<div id="box">
		<div id="header">
			<div id="logo"></div>
		</div>
		<div id="logoncenter">
		  <div id="content">
					<div class="login">
						<div class="line">
						  <img src="images/login/line.gif" alt=" " />
						 </div>
						 <font color="red">${message }</font>						
						 <table height="100%" class="text" border="0" cellspacing="0"  cellpadding="0">
						   <tr>
						     <td>
						       用户名
						     </td>
						     <td  colspan="2">&nbsp;
						       <input class="labbox" type="text" id="login_name" name="login_name" size="20" TABINDEX="1">
						     </td>
						     <td>
						     </td>
						   </tr>
						   <tr>
						     <td>
						       密　码
						     </td>
						     <td  colspan="2">&nbsp;
						       <input class="labbox" type="password" id="login_password" name="login_password" maxlength="20" size="20" TABINDEX="2">
						     </td>
						      <td>
						      	
	                            					      
						     </td>
						     </tr>
						   
						   <tr>
						     <td>
						       验证码
						     </td>
						     <td  colspan="2">&nbsp;
						     	<input class="labbox1" type="text" id="valifyCode" name="valifyCode" id="valifyCode" TABINDEX="3">
						     	<img id="img" src="getImage.html" onclick="changeImage()" title="点击切换验证码!" style="cursor:pointer;" />
						     </td>
						      <td>
						      
                            
                              <label style="margin-left:10px;">
                                  <input name="logon" type="image" src="images/login/c1.gif" TABINDEX="4" onclick="return checkLogin()" />  
                                </label>
						     </td>
						   </tr>
						 </table>						
					     
					</div>
			</div>
		</div>
		<div id="footer">
			<div id="copyright" align="center">
				Copyright &copy;2013.&nbsp;版权所有
			</div>
  		</div>
</div>
</form>


</body>
</html>